package cn.cdeden.knowledge.dubbo;

import cn.cdeden.knowledge.api.domain.RemoteResourceFollowService;
import cn.cdeden.knowledge.domain.SysResourceFollow;
import cn.cdeden.knowledge.service.SysResourceFollowService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import lombok.RequiredArgsConstructor;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.stereotype.Service;

import java.util.Set;

@RequiredArgsConstructor
@Service
@DubboService
public class RemoteResourceFollowServiceImpl implements RemoteResourceFollowService {

    private final SysResourceFollowService sysResourceFollowService;
    @Override
    public void remove(Set<Long> ids) {
        sysResourceFollowService.remove(new QueryWrapper<SysResourceFollow>().in("resource_id", ids));
    }
}
